xen.git
20 years agoThis patch
emellor@leeni.uk.xensource.com [Fri, 10 Mar 2006 00:08:59 +0000 (01:08 +0100)]
This patch

-Displays current parameters for running domains ala xm list
-Allow users to set one or more parameters without having to
 provide values for parameters they do not wish to change
-Adds additional testing of sched-sedf via new xm-test testcases.

With this patch applied, test 02_sedf_period_lower_neg.py exposes a
bug.  I'll follow up this email with a patch for the bug.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
20 years agoAdding hping TCP and UDP tests. They hping a number of packets to
stekloff@localhost.localdomain [Thu, 9 Mar 2006 23:49:54 +0000 (00:49 +0100)]
Adding hping TCP and UDP tests. They hping a number of packets to
local interface, dom0, and from domU to domU. HVM support included.

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
20 years agoFix xmtest 13_create_multinic_pos.py to work with HVM.
stekloff@elm3b216.beaverton.ibm.com [Thu, 9 Mar 2006 23:49:08 +0000 (00:49 +0100)]
Fix xmtest 13_create_multinic_pos.py to work with HVM.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
20 years agoFix a few small issues in xc_domain_dumpcore:
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 22:07:27 +0000 (23:07 +0100)]
Fix a few small issues in xc_domain_dumpcore:

xc_domain_getinfo returns information about a domain, but not
necessarily the one you asked about.  Add check for this.

max_vcpu_id in xc_domain_getinfo is really an ID, not a count, so
make the loop include the last VCPU

Signed-off-by: Ben Thomas <ben@virtualiron.com>
20 years agoMove 'debug' build option into the outermost Config.mk file.
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 21:31:45 +0000 (22:31 +0100)]
Move 'debug' build option into the outermost Config.mk file.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up the usage of CFLAGS. This is nice for packagers, who would
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 20:17:45 +0000 (21:17 +0100)]
Clean up the usage of CFLAGS.  This is nice for packagers, who would
like to control the base compilation flags from a central place.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
20 years agoChange the location of the shared_info page for auto_translated_physmap guests.
cl349@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 16:24:57 +0000 (16:24 +0000)]
Change the location of the shared_info page for auto_translated_physmap guests.
Instead of putting the page outside of the guests pseudo-physical address
space, we put it next to the other pages filled by the domain builder,
such that the page is already mapped in the initial pagetables and/or a
lowmem-type memory mapping.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoBuild MTRR support into privileged xenlinux x86/64.
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 15:03:23 +0000 (16:03 +0100)]
Build MTRR support into privileged xenlinux x86/64.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoApply proper locking in xenlinux mtrr interface functions.
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 14:59:53 +0000 (15:59 +0100)]
Apply proper locking in xenlinux mtrr interface functions.

From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years ago64 bit pagetable builder added to mm.c
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 14:57:32 +0000 (15:57 +0100)]
64 bit pagetable builder added to mm.c
Signed-off-by: Aravindh Puthiyaparambil
<aravindh.puthiyaparambil@unisys.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
20 years agoExplain disadvantages of building pciback as a module in Kconfig help.
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 14:56:12 +0000 (15:56 +0100)]
Explain disadvantages of building pciback as a module in Kconfig help.
Fix a module-loading bug in pciback.

From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMake xc_linux_build() load the initrd page-by-page rather
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 14:16:35 +0000 (15:16 +0100)]
Make xc_linux_build() load the initrd page-by-page rather
than all in one go, to conserve memory. This always has been
the behaviour, but it was changed by a changeset earlier today.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up internal libxc functions to take 'const char *'
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 13:35:36 +0000 (14:35 +0100)]
Clean up internal libxc functions to take 'const char *'
parameters where possible, to avoid unnecessary casts.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd a parallel set of APIs to the domain builders to allow images and
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 12:00:38 +0000 (13:00 +0100)]
Add a parallel set of APIs to the domain builders to allow images and
ramdisks to be passed via buffer, rather than via file.  This allows
usage of the underlying domain building routines in "file-challenged"
enviroments.

Specifically, xc_linux_build_mem is the buffer oriented version of the
file-oriented xc_linux_build.  Likewise, xc_hvm_build_mem is the
buffer oriented analog of the file based xc_hvm_build.

Signed-off-by: Ben Thomas (bthomas@virtualiron.com)
20 years agoAdds a new device interface to xend/xm similar to the one for ioports
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 10:20:31 +0000 (11:20 +0100)]
Adds a new device interface to xend/xm similar to the one for ioports
where an interrupt (irq) can be specified in the configuration file
and permission to bind to that interrupt will be given to a driver
domain.

This functionality could be used when trying to give a legacy device
to a driver domain. For example, by specifying the i/o ports and the
interrupt of your serial controller, you can use this patch to put a
serial port in a driver domain. This was discussed briefly on
xen-users in regards to using an external modem in a domU:

http://article.gmane.org/gmane.comp.emulators.xen.devel/20573
http://article.gmane.org/gmane.comp.emulators.xen.user/8754

Also adds the ability to specify irqs on the xm command-line when
creating a domain (the following examples show a serial port being
given to a domU):

xm create serial-dd irq=4 ioports=03f8-03ff

or in a flat config-file:

irq = [4]
ioports = ['03f8-03ff']

or in an SXP config file:

(device (irq (irq 4)))
(device (ioports (from '0x03f8')(to '0x03ff')))

The ioports functionality is already in xen, but this patch also fixes a
bug with it that I assume cropped up due to changes in xend since it was
submitted ('dev' doesn't exist in iopif.py, returning 'None' seems to be
the solution).

Also adds some in-line documentation in tools/python/xen/xm/create.py
to be more accurate regarding adding pci devices and i/o ports on the
command-line.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
20 years agoAccording to the April 2005 Intel Virtualization Technology Specification
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 10:17:29 +0000 (11:17 +0100)]
According to the April 2005 Intel Virtualization Technology Specification
(Appendix A1) indicates that there are 44 potential exit reason codes.
Based upon this, increase the size of the PERFCOUNTER_ARRAY for vmexits.

Signed-off-by: Ben Thomas (bthomas@virtualiron.com)
20 years agoFix order-of-evaluation issue in xc_domain_dumpcore. The intent is
kaf24@firebug.cl.cam.ac.uk [Thu, 9 Mar 2006 10:16:46 +0000 (11:16 +0100)]
Fix order-of-evaluation issue in xc_domain_dumpcore.  The intent is
to move blocks of memory 4096 pages at a time, and a buffer is
allocated for this.  Unfortunately, the #define is without
parentheses and %/* are the same order and evaluated left to right.
Result: very big buffer being used 4 pages at a time.

Signed-off-by: Ben Thomas (bthomas@virtualiron.com)
20 years agoClean up the interface for sharing xen-heap pages with guests.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 23:45:40 +0000 (00:45 +0100)]
Clean up the interface for sharing xen-heap pages with guests.
Map trace buffer pages as DOMID_XEN pages.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd missing include in hypercalls header file.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 23:04:43 +0000 (00:04 +0100)]
Add missing include in hypercalls header file.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAllow pciback to be built as a module.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 17:41:12 +0000 (18:41 +0100)]
Allow pciback to be built as a module.

From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAllow pciback to be placed into a permissive mode of operation whereby it allows
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 16:32:36 +0000 (17:32 +0100)]
Allow pciback to be placed into a permissive mode of operation whereby it allows
PCI config writes to succeed by default. Currently this is the only way to allow
control of a device that has device-specific registers in the config space from
a driver domain.

echo Y >/sys/module/pciback/parameters/permissive

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoTrivial fix for pcifront bringup.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 14:51:28 +0000 (15:51 +0100)]
Trivial fix for pcifront bringup.

From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix call to set_timer in vlapic.c. Should not set timer.expires
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 14:49:04 +0000 (15:49 +0100)]
Fix call to set_timer in vlapic.c. Should not set timer.expires
outside set_timer, since set_timer will do that for the caller.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoImplement guest_access routines for copying to/from a sub-field of a structure.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 14:39:59 +0000 (15:39 +0100)]
Implement guest_access routines for copying to/from a sub-field of a structure.
Use this as part of a tidy-up of the multicall hypercall.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoUndo misapplied search replace.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 14:35:14 +0000 (15:35 +0100)]
Undo misapplied search replace.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoLower-casify some macros, and rename kernel_mode() to guest_kernel_mode().
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 14:02:43 +0000 (15:02 +0100)]
Lower-casify some macros, and rename kernel_mode() to guest_kernel_mode().
Fix the macro so that it evaluates false if the given register context is
not a valid guest context.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoUpdate Xen extraversion to reflect unstable status.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 10:54:48 +0000 (11:54 +0100)]
Update Xen extraversion to reflect unstable status.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThe PAE guest can run on SMP 64-bit Xen0 now.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 10:53:39 +0000 (11:53 +0100)]
The PAE guest can run on SMP 64-bit Xen0 now.

Optimize the save/restore action for EFER MSR during the context switch.

Signed-off-by: Jun Nakajima jun.nakajima@intel.com
Signed-off-by: Xiaohui Xin xiaohui.xin@intel.com
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
20 years agoKeep totalram_pages in sync with current_pages in balloon driver.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 10:51:17 +0000 (11:51 +0100)]
Keep totalram_pages in sync with current_pages in balloon driver.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd some bounds checking to values passed when changing the period and
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 10:48:34 +0000 (11:48 +0100)]
Add some bounds checking to values passed when changing the period and
slice of a domain using the sedf scheduler.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
20 years agoEnsure old Python files are overwritten during tools install.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 10:18:39 +0000 (11:18 +0100)]
Ensure old Python files are overwritten during tools install.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
20 years agoFix 64-bit Linux build.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 10:11:53 +0000 (11:11 +0100)]
Fix 64-bit Linux build.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix up #PF error code before propagating to guest kernel.
kaf24@firebug.cl.cam.ac.uk [Wed, 8 Mar 2006 09:33:31 +0000 (10:33 +0100)]
Fix up #PF error code before propagating to guest kernel.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up vlapic code.
kaf24@firebug.cl.cam.ac.uk [Tue, 7 Mar 2006 17:41:37 +0000 (18:41 +0100)]
Clean up vlapic code.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
20 years agoUpgrade all hypercalls to use the new guest_handle interface (on the Xen side).
kaf24@firebug.cl.cam.ac.uk [Tue, 7 Mar 2006 17:40:42 +0000 (18:40 +0100)]
Upgrade all hypercalls to use the new guest_handle interface (on the Xen side).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoCleanup i386 entry.S.
cl349@firebug.cl.cam.ac.uk [Tue, 7 Mar 2006 15:48:36 +0000 (15:48 +0000)]
Cleanup i386 entry.S.
Many of the changes to entry.S can be removed because we don't support
CONFIG_PREEMPT anymore.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoTighten up the assertion conditions in the GUEST_MODE() macro.
kaf24@firebug.cl.cam.ac.uk [Tue, 7 Mar 2006 13:40:23 +0000 (14:40 +0100)]
Tighten up the assertion conditions in the GUEST_MODE() macro.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSVM patch to add missing svm_asid() call into 64bit exits.S vmexit loop.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 22:50:30 +0000 (23:50 +0100)]
SVM patch to add missing svm_asid() call into 64bit exits.S vmexit loop.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
20 years agoFix additional gdbstub issues.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 22:49:48 +0000 (23:49 +0100)]
Fix additional gdbstub issues.
- gdbstub.h uses atomic_t and PAGE_SIZE, so include those headers
- do not lie about setting breakpoints
- fix memory writing

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
20 years agoAdd next/previous key bindings to XenMon curses mode.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 22:47:53 +0000 (23:47 +0100)]
Add next/previous key bindings to XenMon curses mode.

Signed-off-by: Diwaker Gupta <dgupta@cs.ucsd.edu>
20 years agoFix reporting of time intervals in the log mode of XenMon.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 22:47:14 +0000 (23:47 +0100)]
Fix reporting of time intervals in the log mode of XenMon.
Fix duration to sleep between iterations (earlier hardcoded to 1sec)
Signed-off-by: Diwaker Gupta <dgupta@cs.ucsd.edu>
20 years agoNo need to re-set vm_pgoff before calling remap_pfn_range(). It will do
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 19:29:39 +0000 (20:29 +0100)]
No need to re-set vm_pgoff before calling remap_pfn_range(). It will do
it itself in cases where it is necessary.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMake /proc/xen/xsd_kva with permissions 0600 so it can be opened
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 18:47:26 +0000 (19:47 +0100)]
Make /proc/xen/xsd_kva with permissions 0600 so it can be opened
for write access (and mmap()ed with write permissions).

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
20 years agoSimplify ptrace_names array declaration.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 18:26:30 +0000 (19:26 +0100)]
Simplify ptrace_names array declaration.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoCleanup whitespace.
cl349@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 17:15:10 +0000 (17:15 +0000)]
Cleanup whitespace.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoFix build with some gcc versions.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 17:05:09 +0000 (18:05 +0100)]
Fix build with some gcc versions.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoUpdate microcode.c to linux-2.6.16-rc5 codebase.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 14:39:48 +0000 (15:39 +0100)]
Update microcode.c to linux-2.6.16-rc5 codebase.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAllow NMI watchdog setup on newer P4 processors.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 14:30:12 +0000 (15:30 +0100)]
Allow NMI watchdog setup on newer P4 processors.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agolibxc: Verify Magic number when reading dump
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 14:04:18 +0000 (15:04 +0100)]
libxc: Verify Magic number when reading dump

The xen core files record a magic number,
but when they are loaded it isn't checked.
This patch resolves this.

Signed-Off-By: Horms <horms@verge.net.au>
20 years agoFix boot-memory layout description.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 14:02:26 +0000 (15:02 +0100)]
Fix boot-memory layout description.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoConsolidate xc_ptrace and xc_ptrace_core
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 11:06:55 +0000 (12:06 +0100)]
Consolidate xc_ptrace and xc_ptrace_core

* xc_ptrace
  - Merge xc_ptrace_core into xc_ptrace
  - ATTACH now reads the data argument. If non-zero then
    a corefile is being debuged. Otherwise a thread has
    been attached to. This allows xc_waitdomain_core() or
    xc_waitdomain() to be called as appropriate in
    subsequent xc_ptrace() calls.
* xc_waitdomain
  - Rename xc_waitdomain (xc_ptrace.c version) __xc_waitdomain
  - Rename xc_waitdomain (xc_ptrace_core.c version) xc_waitdomain_core
  - Create xc_waitdomain (in xc_ptrace.c), a wrapper for __xc_waitdomain
    and xc_waitdomain_core.
  Consolidation seemed difficult but ctxt needs to be
  passed into xc_waitdomain_core or made global.
  Alternatively, xc_waitdomain_core could be moved into xc_ptrace.c,
  but this seems messy.
* map_domain_va
  - Rename map_domain_va (xc_ptrace_core.c version) map_domain_va_core
  - Have it accept ctxt, like xc_waitdomain_core
* myptrace and myxcwait (linux-xen-low.c)
  Removed, call the now generic xc_ptrace() and xc_waitdomain() instead

When calling xc_ptrace ATTACH, if a corefile is in use, a fd will
be passed, otherwise a pid. The fd part is important, as this
is saved internally in xc_ptrace_core.c, and passed to xc_waitdomain_core()
as neccessary. Pereviously xc_waitdomain_core() received a pid and
thus could not open the corefile.

Signed-Off-By: Horms <horms@verge.net.au>
20 years agolibxc: xc_ptrace cleanups
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 11:05:44 +0000 (12:05 +0100)]
libxc: xc_ptrace cleanups

General Cleanups
* Use { after if consistently in xc_ptrace.c and xc_ptrace_core.c
  (But not in xc_ptrace_core() which should be removed shortly)
* Remove duplicate code and centralise around xc_ptrace.h
* Avoid ifing values covered by case in xc_ptrace()
  - PTRACE_GETREGS, PTRACE_GETFPREGS and PTRACE_GETFPXREGS are grouped into
    a single case, and then with the exception of a call to FETCH_REGS(),
    different code is executed based on ifing the values covered by the
    case.  The PTRACE_GETFPREGS and PTRACE_GETFPXREGS code is actually a
    duplicate.  This patch breaks the code out to two different cases.

Error Handling
* Eliminate FETCH_REGS macro as it forces several functions
  to have an otherwise uneeded error_out label, mittigating
  any code savins.
* Rework error handling in xc_ptrace().
  - Remove FETCH_REGS as above
  - Make sure that all dom0 errors are caught
  - Make sure errno is always set on error
* Eliminate gotos in xc_ptrace_core.c that do nothing but return

Signed-Off-By: Horms <horms@verge.net.au>
20 years agoFix DBG_LEVEL_VLAPIC_INTERRUPT definition.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 10:04:37 +0000 (11:04 +0100)]
Fix DBG_LEVEL_VLAPIC_INTERRUPT definition.
It should be different from DBG_LEVEL_VLAPIC_TIMER.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoFix ia64 build.
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 10:02:53 +0000 (11:02 +0100)]
Fix ia64 build.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
20 years agoFix mkelf32 cross compilation support. The previous fix for
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 10:01:43 +0000 (11:01 +0100)]
Fix mkelf32 cross compilation support. The previous fix for
this was misapplied by me.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix SVM guest destroy: I/O shared page is mapped globally so must unmap
kaf24@firebug.cl.cam.ac.uk [Mon, 6 Mar 2006 09:58:50 +0000 (10:58 +0100)]
Fix SVM guest destroy: I/O shared page is mapped globally so must unmap
with unmap_domain_page_global().

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Sat, 4 Mar 2006 18:16:36 +0000 (19:16 +0100)]
Merged.

20 years agoAllow callers to XendClient.xend_list_domains to specify the detail flag, and
emellor@leeni.uk.xensource.com [Sat, 4 Mar 2006 18:15:36 +0000 (19:15 +0100)]
Allow callers to XendClient.xend_list_domains to specify the detail flag, and
turn detail off when doing vcpu-list.  This avoids calls to xenstore just to
get the list of domains for the vcpu-list call, significantly increasing
performance of that command on loaded systems.

Closes bug #545.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoLog the tdb_error when a read fails with EIO. This is happening after a long
emellor@leeni.uk.xensource.com [Sat, 4 Mar 2006 18:12:37 +0000 (19:12 +0100)]
Log the tdb_error when a read fails with EIO.  This is happening after a long
time under load -- hopefully this message will suggest why.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded a 'state' field to the xenbus_device structure, which caches the state
emellor@leeni.uk.xensource.com [Sat, 4 Mar 2006 18:10:56 +0000 (19:10 +0100)]
Added a 'state' field to the xenbus_device structure, which caches the state
at the local end of the xenbus connection (i.e. that value that is passed
through xenbus_switch_state).  This means that xenbus_probe can wait for all
the boot devices to become ready without having to hurt the store.

Also, fix this probing -- previously, the wrong value was being returned by
all_devices_ready_, so this polling would only have waited for one device.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMake guest_access implementation arch-specific.
kaf24@firebug.cl.cam.ac.uk [Sat, 4 Mar 2006 09:32:10 +0000 (10:32 +0100)]
Make guest_access implementation arch-specific.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix some warnings when compiling tools.
kaf24@firebug.cl.cam.ac.uk [Sat, 4 Mar 2006 09:25:05 +0000 (10:25 +0100)]
Fix some warnings when compiling tools.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoRename guest_handle() macro to GUEST_HANDLE() and define_guest_handle()
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 18:21:48 +0000 (19:21 +0100)]
Rename guest_handle() macro to GUEST_HANDLE() and define_guest_handle()
to DEFINE_GUEST_HANDLE(). All caps for datatype declarations and
definitions got the popular vote. :-)

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years ago/proc/xen/xsd_kva exports mmap interface that xenstored now uses to map the
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 18:07:55 +0000 (19:07 +0100)]
/proc/xen/xsd_kva exports mmap interface that xenstored now uses to map the
domain0 xenbus page.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAvoid floating point in hash table implementation.
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 18:06:50 +0000 (19:06 +0100)]
Avoid floating point in hash table implementation.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMove dom0_op hypercall to the guest_handle interface (inside Xen).
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 17:26:41 +0000 (18:26 +0100)]
Move dom0_op hypercall to the guest_handle interface (inside Xen).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Fri, 3 Mar 2006 14:56:34 +0000 (15:56 +0100)]
Merged.

20 years agoWait for the devices configured at start-up, before allowing the boot to
emellor@leeni.uk.xensource.com [Fri, 3 Mar 2006 14:56:03 +0000 (15:56 +0100)]
Wait for the devices configured at start-up, before allowing the boot to
proceed.  This avoids the race (bug #549) that would result in the infamous
VFS: Cannot open root device "sda1" or unknown-block(0,0) message even when
the hotplug layer had succeeded to configure the device.

Note that The Infamous Message has many possible root causes -- this change
only fixes one of them.  This particular root cause is characterised by
successful boots interleaved with unsuccessful ones, and diagnose.py showing
both front and backend drivers in the Connected state.

Closes bug #549.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoChange the way that reboot-timeouts are handled. Rather than refreshing the
emellor@leeni.uk.xensource.com [Fri, 3 Mar 2006 14:41:56 +0000 (15:41 +0100)]
Change the way that reboot-timeouts are handled.  Rather than refreshing the
list of domains each time XendDomainInfo.refresh is called, and spawning
threads for each shutdown still in progress, we watch the control/shutdown
node and spawn just the one thread immediately.  When the daemon starts (say
after a crash) all domains are checked for entries in the store indicating a
reboot in progress.

This avoids a large cost on the store and in threads when the list of domains
is refreshed.  This happens every time the server is queried, so the cost can
be quite high.  It's especially a high cost when using xm shutdown -a -w --
this operation should perform a lot better now.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded further integrity checking, this time checking for duplicate directory
emellor@leeni.uk.xensource.com [Fri, 3 Mar 2006 14:37:28 +0000 (15:37 +0100)]
Added further integrity checking, this time checking for duplicate directory
entries and for orphaned nodes in the database.

Added two flags, -R and -L, to disable the recovery code and the remove of
/local at start-up.  This makes it much easier to analyse corrupted tdb files.

Added some missing talloc_free calls in the previous integrity checking code.

Removed the transaction handle from the trace_io message -- unfortunately,
the transaction is always null at this point, as it's not yet been looked up.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoCope when the filename returned by losetup for an existing loop device is not
emellor@leeni.uk.xensource.com [Fri, 3 Mar 2006 14:32:42 +0000 (15:32 +0100)]
Cope when the filename returned by losetup for an existing loop device is not
fully qualified.  In this case, the readlink -f call to canonicalise that name
fails.

Closes bug #553.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDomain0 identifies IOAPIC by physical base address rather than BIOS-assigned identifier.
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 14:05:25 +0000 (15:05 +0100)]
Domain0 identifies IOAPIC by physical base address rather than BIOS-assigned identifier.
This seems a more reliable method since it seems that we always trust the base address
and we don't need to work around renumbering/rebasing as we do with APICIDs.

This is an alternative to the Yonah networking patch from Allen Kay at Intel.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up PIT-thru-ioapic setup. We don't need the legacy missed-tick
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 13:10:35 +0000 (14:10 +0100)]
Clean up PIT-thru-ioapic setup. We don't need the legacy missed-tick
logic and so do not need to keep the PIT enabled thru the 8259 PIC.

Todo: arguable we should sync with x86/64 platform files, assuming they
do not throw out 'recent legacy' stuff (e.g., 32-bit only platforms
like P6). Getting rid of all the 82489DX and 486-era SMP stuff would be
great.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMinor enhancements to gdbbuild, the build script for gdbserver-xen.
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 10:17:09 +0000 (11:17 +0100)]
Minor enhancements to gdbbuild, the build script for gdbserver-xen.
 1. Use $MAKE if set
 2. Make mirror configurable from environment

From: Horms <horms@verge.net.au>

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoIt's not necessary to define a function for dumping virtual IOAPIC
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 09:58:42 +0000 (10:58 +0100)]
It's not necessary to define a function for dumping virtual IOAPIC
table entry, that makes the code hard to comply with condition
compiling of HVM_DBG_LOG.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoAdd a description of the virtual TPM interface to the interface
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 09:57:37 +0000 (10:57 +0100)]
Add a description of the virtual TPM interface to the interface
document and explain some of the internals of the device driver.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoThis patch undoes 8697 and makes xm reboot/shutdown work again. This code
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 09:56:54 +0000 (10:56 +0100)]
This patch undoes 8697 and makes xm reboot/shutdown work again. This code
does expose a bug in xenstored when it is killed & restarted, but that
is not caused by this code.

My sincere appology to Ke Yu for the long wait and assuming his code
was broken.  His code was perfectly fine. Its just that my test scripts
did something for a historical reason that I should have removed a long
time ago.

Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com>
20 years agoRaises an explicit error message when the domain config file specifies
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 09:56:13 +0000 (10:56 +0100)]
Raises an explicit error message when the domain config file specifies
an incorrect path to a file-backed VBD (disk image) or the file-backed
VBD does not exist.

Without this patch, if someone mis-types the path to the disk image,
he/she would have no indication as to what's wrong when the domain
fails to get created.

Signed-off-by: Khoa Huynh <khoa@us.ibm.com>
20 years agoVTPM fixes:
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 09:55:11 +0000 (10:55 +0100)]
VTPM fixes:
- fixes a problem in the vTPM backend where the timer was killed when
the timer function was run
- removes a variable from being put in the ring by the frontend
- reformatting due to indent tool running over some of the files

Has been tested with the vtpm-relevant parts of xm-test.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoFix up some issues I found when porting PPC to the new common gdb stub code:
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 09:53:58 +0000 (10:53 +0100)]
Fix up some issues I found when porting PPC to the new common gdb stub code:
- cosmetic changes in the messages printed
- 'flags' must always be unsigned long.
- explicitly calling initialize_gdb() is not difficult. For x86 and ia64 I
placed this call immediately before do_initcalls(), since that's where it's
being called from now so we know it's safe. Architecture people can move it
earlier as appropriate.
- I don't understand all these ASSERT(!local_irq_is_enabled()) statements,
sometimes bracketing a single call like receive_command(). How exactly would
receive_command() manage to re-enable irqs? Also, a failing ASSERT would just
call into the stub again anways...
- initialize_gdb() was overcomplicated. serial_parse_handle() already handles
the parsing for us, and there's no need to panic there.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
20 years agoVTPM_Tools: Fix error when closing only vtpm, and fix restore bug when
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 09:46:06 +0000 (10:46 +0100)]
VTPM_Tools: Fix error when closing only vtpm, and fix restore bug when
no dmis exist

The first bug prevented the TPM tests from running successfully more
than once in a row.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
20 years agoIgnore external (user-provided) CFLAGS when building vmxassist and hvmloader.
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 09:44:40 +0000 (10:44 +0100)]
Ignore external (user-provided) CFLAGS when building vmxassist and hvmloader.
They do more harm than good.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd a 'clear trap table' path to set_trap_table hypercall, taken when
kaf24@firebug.cl.cam.ac.uk [Fri, 3 Mar 2006 09:34:03 +0000 (10:34 +0100)]
Add a 'clear trap table' path to set_trap_table hypercall, taken when
the input table is NULL.

Also, no need for set_trap_table to take the per-domain biglock.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoCope if xenstore is down.
emellor@leeni.uk.xensource.com [Thu, 2 Mar 2006 20:45:13 +0000 (21:45 +0100)]
Cope if xenstore is down.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded hashtable implementation, to support the reachability check against the
emellor@leeni.uk.xensource.com [Thu, 2 Mar 2006 20:44:49 +0000 (21:44 +0100)]
Added hashtable implementation, to support the reachability check against the
store.  This code is by Christopher Clark.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDon't compile HVM_DBG_LOG into xen by default.
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 20:37:14 +0000 (21:37 +0100)]
Don't compile HVM_DBG_LOG into xen by default.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoFix libxc warnings with gcc-4.1 and glibc-2.3.90.
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 20:36:03 +0000 (21:36 +0100)]
Fix libxc warnings with gcc-4.1 and glibc-2.3.90.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
20 years agoMany fixes and cleanups for lomount:
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 20:35:17 +0000 (21:35 +0100)]
Many fixes and cleanups for lomount:
- Fixed several overflows, off-by-one, and uninitialized variables.
- Added well-defined exit codes.
- Proper handling of system()'s return value.
- Errors parsing partition table cause it to stop now.
- etcetera...

Tested on 32 and 64 bit, with valgrind, with physical disks and disk
images.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
20 years agoChange debug level of vmx_io_instruction to DBG_LEVEL_IO.
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 20:34:16 +0000 (21:34 +0100)]
Change debug level of vmx_io_instruction to DBG_LEVEL_IO.

From: Himanshu Raj

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd empty files need to fix ia64 build.
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 18:16:21 +0000 (19:16 +0100)]
Add empty files need to fix ia64 build.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up use of wait_event_interruptible().
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 17:57:03 +0000 (18:57 +0100)]
Clean up use of wait_event_interruptible().

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agolinux-x86-64: eliminate duplicate exports
cl349@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 15:41:45 +0000 (15:41 +0000)]
linux-x86-64: eliminate duplicate exports
Symbols are exported from files shared with i386.

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoRemove unnecessary include statements.
cl349@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 15:37:46 +0000 (15:37 +0000)]
Remove unnecessary include statements.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agolinux: clean up setup_arch_post.h
cl349@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 15:33:47 +0000 (15:33 +0000)]
linux: clean up setup_arch_post.h
- machine_specific_memory_setup() was unused on x86-64
- machine_specific_modify_cpu_capabilities() must not be __init (for CPU hotplug)
- machine_specific_modify_cpu_capabilities() should be called in similar ways on 32- and 64-bits

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoWhile native code range-checks the requested address, possibly
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 15:06:51 +0000 (16:06 +0100)]
While native code range-checks the requested address, possibly
truncates the range, and then reads/writes page-wise until possibly
encountering a -EFAULT issue, Xen code accessed the whole range in a
single step, thus not allowing partially succeeding accesses.

From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoA few changes to the new 'guest handle' interface:
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 13:43:24 +0000 (14:43 +0100)]
A few changes to the new 'guest handle' interface:

 DEFINE_GUEST_HANDLE -> define_guest_handle

 GUEST_HANDLE        -> guest_handle

 New __define_guest_handle allows handle name different from
 encapsulated type's name (useful for awkward typenames).

 Got rid of xen_ulong, now use guest_handle(ulong).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMake sure that installed files have sensible permissions and are owned by the
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 10:41:48 +0000 (11:41 +0100)]
Make sure that installed files have sensible permissions and are owned by the
user running install. Also clean up the install script a little.

Signed-off-by: Horms <horms@verge.net.au>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix problems when creating HVM guest on PAE host with >4G physical memory.
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 10:03:34 +0000 (11:03 +0100)]
Fix problems when creating HVM guest on PAE host with >4G physical memory.

Signed-off-by: Yunhong Jiang yunhong.jiang@intel.com
Signed-off-by: Jun Nakajima jun.nakajima@intel.com
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 10:00:49 +0000 (11:00 +0100)]
merge

20 years agoFix printing of u64 value 'msr_content' to use PRIx64 format.
kaf24@firebug.cl.cam.ac.uk [Thu, 2 Mar 2006 09:59:34 +0000 (10:59 +0100)]
Fix printing of u64 value 'msr_content' to use PRIx64 format.

Signed-off-by: Keir Fraser <keir@xensource.com>